Optimal. Leaf size=74 \[ \frac{b \log (a \cos (c+d x)+b)}{d \left (a^2-b^2\right )}+\frac{\log (1-\cos (c+d x))}{2 d (a+b)}-\frac{\log (\cos (c+d x)+1)}{2 d (a-b)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.105345, antiderivative size = 74, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.158, Rules used = {3872, 2721, 801} \[ \frac{b \log (a \cos (c+d x)+b)}{d \left (a^2-b^2\right )}+\frac{\log (1-\cos (c+d x))}{2 d (a+b)}-\frac{\log (\cos (c+d x)+1)}{2 d (a-b)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3872
Rule 2721
Rule 801
Rubi steps
\begin{align*} \int \frac{\csc (c+d x)}{a+b \sec (c+d x)} \, dx &=-\int \frac{\cot (c+d x)}{-b-a \cos (c+d x)} \, dx\\ &=\frac{\operatorname{Subst}\left (\int \frac{x}{(-b+x) \left (a^2-x^2\right )} \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=\frac{\operatorname{Subst}\left (\int \left (\frac{1}{2 (a-b) (a-x)}-\frac{b}{(a-b) (a+b) (b-x)}+\frac{1}{2 (a+b) (a+x)}\right ) \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=\frac{\log (1-\cos (c+d x))}{2 (a+b) d}-\frac{\log (1+\cos (c+d x))}{2 (a-b) d}+\frac{b \log (b+a \cos (c+d x))}{\left (a^2-b^2\right ) d}\\ \end{align*}
Mathematica [A] time = 0.0929826, size = 63, normalized size = 0.85 \[ \frac{(a-b) \log \left (\sin \left (\frac{1}{2} (c+d x)\right )\right )-(a+b) \log \left (\cos \left (\frac{1}{2} (c+d x)\right )\right )+b \log (a \cos (c+d x)+b)}{d (a-b) (a+b)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.048, size = 75, normalized size = 1. \begin{align*}{\frac{b\ln \left ( b+a\cos \left ( dx+c \right ) \right ) }{d \left ( a-b \right ) \left ( a+b \right ) }}-{\frac{\ln \left ( \cos \left ( dx+c \right ) +1 \right ) }{d \left ( 2\,a-2\,b \right ) }}+{\frac{\ln \left ( -1+\cos \left ( dx+c \right ) \right ) }{d \left ( 2\,a+2\,b \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.981529, size = 86, normalized size = 1.16 \begin{align*} \frac{\frac{2 \, b \log \left (a \cos \left (d x + c\right ) + b\right )}{a^{2} - b^{2}} - \frac{\log \left (\cos \left (d x + c\right ) + 1\right )}{a - b} + \frac{\log \left (\cos \left (d x + c\right ) - 1\right )}{a + b}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.86108, size = 173, normalized size = 2.34 \begin{align*} \frac{2 \, b \log \left (a \cos \left (d x + c\right ) + b\right ) -{\left (a + b\right )} \log \left (\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) +{\left (a - b\right )} \log \left (-\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right )}{2 \,{\left (a^{2} - b^{2}\right )} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\csc{\left (c + d x \right )}}{a + b \sec{\left (c + d x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.34327, size = 135, normalized size = 1.82 \begin{align*} \frac{\frac{2 \, b \log \left ({\left | -a - b - \frac{a{\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac{b{\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} \right |}\right )}{a^{2} - b^{2}} + \frac{\log \left (\frac{{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right )}{a + b}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]